package com.qf.votedemo.rabbitmp;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author 刘欣
 * @createTime 2023/3/2 14:26
 * @description 生产消息
 */
@Component
public class VoteLogsSend {

    @Autowired
    private RabbitTemplate rabbitTemplate;

    public void send(String exName, String routingkey, Object obj) {
        rabbitTemplate.convertAndSend(exName, routingkey, obj);
    }

}
